# -*- coding:utf-8 -*-
# 协程

def consumer():
    print('into consumer')
    while True:
        get = yield
        print('I get', get)

def producer():
    c = consumer()
    c2 = consumer()
    c.__next__()
    c2.__next__()
    for i in range(10):
        c.send(i)
        c2.send(i)

producer()